package com.umpay.privi.dao.on.sys;

import java.util.List;
import java.util.Map;

import com.umpay.common.persist.ibatis.DataAccessException;
import com.umpay.privi.dao.EntityDao;
import com.umpay.privi.exception.BusinessException;
import com.umpay.privi.model.sys.Resource;

/** 
 * desc:URL资源Dao类
 * <p>创建人：Ding Zhe 创建日期：Apr 19, 2013 </p>
 * @version V1.0  
 */
public interface ResourceDao  extends EntityDao<Resource> {
		/**
		 * desc:通过资源ID查询资源
		 * <p>创建人：Ding Zhe , Apr 19, 2013 5:33:17 PM</p>
		 * @param resId 资源编号
		 * @return 资源
		 * @throws DataAccessException
		 */
		public Resource get(Integer resId) throws DataAccessException;
		/**
		 * desc:根据条件查询系统资源
		 * <p>创建人：Ding Zhe , May 14, 2013 9:22:48 PM</p>
		 * @param paraMap 其中sysId为必传
		 * @return
		 * @throws DataAccessException
		 */
		public List<Resource> findAllSysResources(Map<String, Object> paraMap) throws DataAccessException;
		
		/**
		 * desc:执行sql
		 * <p>创建人：chengliuyun , Dec 1, 2013 7:24:43 PM</p>
		 * @param sql
		 * @return
		 * @throws DataAccessException
		 */
		public int statement(String sql) throws DataAccessException;
		
		/**
		 * desc:修改资源
		 * <p>创建人：liucong , Apr 18, 2014 2:44:29 PM</p>
		 * @param req
		 * @throws DataAccessException
		 * @throws BusinessException
		 */
		public void updateResource(Map<String,Object> req) throws DataAccessException,BusinessException;

		/**
		 * desc:删除资源
		 * <p>创建人：liucong , Apr 18, 2014 3:56:38 PM</p>
		 * @param req
		 * @throws DataAccessException
		 * @throws BusinessException
		 */
		public void deleteResource(Map<String,Object> req) throws DataAccessException,BusinessException;

		/**添加资源
		 * desc:
		 * <p>创建人：liucong , Apr 21, 2014 5:17:34 PM</p>
		 * @param resource
		 * @return
		 * @throws DataAccessException
		 * @throws BusinessException
		 */
		public Integer insterResource(Resource resource) throws DataAccessException,BusinessException;
}



